Python 3 compatibility hack.