Fixed a Python 3 specific crash.
Merge branch 'master' into icns+jp2k