Long‐term variations of interplanetary magnetic field spectra with implications for cosmic ray modulation