Update proxy support so it also works with Python 2.6.