Means for sealing the sensor element in a housing