Dark photon dark matter produced by axion oscillations