Former rebel sworn in as president