Fixed bug in JSON encoder for Python 2.6