Crystal structure of the soluble part of a magnesium transporter