AIG Unit to pay $40 million to the SEC in referral fees tied to teacher pensions