Python 2.5/3.3 fixes.