Make the module Python3 compatible.

Although it should run without change at least with python 2.7 as well.