Fix uriencode for Python >= 3.3