Split out urllib and urlparse compat imports