The structure of magnesium phosphate glasses