Analytic embedded-atom method approach to studying the surface segregation of Al-Mg alloys