Geomagnetic influence on the muon charge ratio of cosmic rays