components/fold: some Py2.6 compatibility fixes