Libya declares state of emergency in Tripoli