Afghan president picks former foe as foreign minister