US candidate loses race to lead UN migration agency