Fix urlretrieve backwards compatibility with Python 2.