Make python2.6 compatible python3 changes