Somalia 's parliament has approved Mohammed Ali Gedi as the country 's new prime minister , nearly two weeks after rejecting his nomination .