Libyan government says has lost control of most Tripoli ministries