fix support for Py2.4