fix compile errors for some benchmarks
change to python 2.4 compatible