Detecting hydrocarbon leaks