Electron cyclotron resonance heating of plasmas in tandem mirrors