Has to work in Python 2.4, which doesn't support the timeout arg to urlopen,
so using socket.setdefaulttimeout() now instead.