A less dirty Python 3 compatibility tweak.