Theory of the effect of geomagnetic field on plug-and-play schemes for fiber-based quantum key distribution