Added Python 2 / Python 3 compatibility with 'six' package