[GCC 4.4] Make it compatible with GCC 4.4.

Lambdas were replaced by functional object.