Fixes for platforms which still use Python 2.6
Bumped version to 1.3.1