avoid ImportError of urlparse

This change is for avoiding ImportError of urlparse on Python 3.