compatibility with python 2.7
compatibility with python 2.7

Supposedly tested for pull request #946 (by me) but something went
wrong.

Tested again for python 3.4 & 2.7, encodings cp437, latin1 and utf8
(default)

nltk/nltk,nltk/nltk,nltk/nltk