Libyan assembly votes Gaddafi opponent as president