www.google.com/ncr works well, with the added advantage that it 'sticks', meaning that you only have to enter it once.
I presume it uses a cookie to set you to .com more or less permanently.
When you visit a site like google.com, your numeric IP address (you can't see it, but everything on the Internet has an IP address) is sent with your request. Sites like Google check that against a database to get a pretty accurate indication what country that IP address has been allocated to.
That's how they to the redirecting trick.