Fix Python 3 compatibility (and break Python <= 2.5).