Don't pass unicode to urlencode in Python 2

Fixes #23