AMENDMENT NO. 12 TO AMENDED AND RESTATED AGREEMENT AND DECLARATION OF TRUST OF AIM INVESTMENT FUNDS