2to3: Python 3 compatibility fixes.