Mitigation of coherent noise and spectral interference in integrated and free-space mid-infrared laser spectrometers