Two-dimensional ideal magnetohydrodynamics and differential geometry