Use six type defintions for Python 3 compatibility