Localized surface segregation and martensite nucleation in binary alloys