Libyan parliament elects new speaker after lawmakers amend internal rules