Make python2.4 compatible