Axion helioscopes as solar magnetometers