AMENDMENT NO. 1 TO MASTER REPURCHASE AND SECURITIES CONTRACT AND CONSENT TO RESTRUCTURING