Make setup.py work on Python 3 reliably

Fixes https://bugs.launchpad.net/gtimelog/+bug/1263772