Ngozi Okonjo-Iweala had been frontrunner for the role but was opposed by the Trump administration.