Fix makeqstrdata.py to work in Python 2.7