[core] Make thrift generated files python2.4 compliant