Anomalous character of the axion–photon coupling in a magnetic field distorted by a pp-wave gravitational background