Libya advances toward elections