The dissolution of magnesium in Cl− and F− containing aqueous solutions