Compat fixes for py26