WAIVER, CONSENT, AND AMENDMENT NO. 5 TO SECOND AMENDED AND RESTATED CREDIT AGREEMENT