Libyan prime minister quits after one month, citing violence