Fix python 3.3 compatibility issues.