Exploring corrosion protection of Mg via ionic liquid pretreatment