Backward compatibility to python 2.6