A new way to detect oxygen in exoplanet atmospheres