handle py2/3 urlencode import