Libyan militias resist advance of pro-Haftar forces on Tripoli