First-principles investigation of phase stability in the Mg-Sc binary alloy