Gas sensing using wavelength modulation spectroscopy