Fix py26/py33 compatibility issues.