Fix gmail.py to work with Python3.