Restore compatibility with Python 2.6

str.decode() only gained support for kwargs in Python 2.7