Use lambdas instead if we don't have C++11 support.