The influence of magnetic fields on the thermodynamics of primordial star formation