Spectrometer for optical detection of magnetic resonance: Magneto-optical study of Yb3+ in BaF2 single crystal