Gas-responsive porous magnet distinguishes the electron spin of molecular oxygen