THIRD AMENDMENT TO THIRD AMENDED AND RESTATED CREDIT AGREEMENT Dated as of August 11, 2016 among PLAINS MARKETING, L.P. and PLAINS MIDSTREAM CANADA ULC, as Borrowers, PLAINS ALL AMERICAN PIPELINE, L.P., as Guarantor