Controlling corrosion kinetics of magnesium alloys by electrochemical anodization and investigation of film mechanical properties