Planck intermediate results: XLII. Large-scale Galactic magnetic fields