Compact terahertz cyclotron resonance spectrometer in high magnetic fields