Add python 2.6 fix to py3 branch