Geomagnetic fluctuations during a polarity transition