Pakistan won a topsy-turvy match in Lahore to level the series at 2-2 with three matches to play