Fix Python 3 breakage from 2.6 compat