Fix urlparse for Python3