AMENDMENT NO. 31 AMENDED AND RESTATED GLOBAL CUSTODY AGREEMENT