THIRD AMENDMENT AND WAIVER TO CREDIT AGREEMENT AND FIRST AMENDMENT TO SECURITY AGREEMENT