urlparse compat for python3.