Fix python 3 support with 2to3