Resolve urlencode import with tolerance for Python 3