Rival factions in Libya agree on an interim presidential council to lead the country into elections in December.