Further Python3 compatibility
Use 'six' module for better compatibility.