That's not true. Companies aren't free to set transfer prices. The IRS has many rules on how much a company can charge a foreign unit for a product (and vice verse). That method of tax avoidance was closed a long time ago.
It was not closed, it was reduced. Companies are still doing it. They wouldn't continue if it wasn't beneficial to do so.
US regulations also don't do anything to transfer prices in other countries. Google apparently pays something like 2.4% tax on their foreign profits because they funnel them all to the Bahamas.
I won't argue that companies are still trying to reduce taxes through transfer prices. However, any company that tries to avoid US taxes through transfer price schemes is not going to get very far. I have no doubt that Google is funneling a lot of revenue through the Bahamas, but they must have setup the off-shore corporation in such a way as to fall outside the jurisdiction of the IRS. To say that they are only paying 2.4% on "foreign profits" means nothing. If that's what they are supposed to pay, then nothing is wrong right? Google is an international corporation.