Trends in the F2 ionospheric layer due to long-term variations in the Earth's magnetic field