Remove lambda to be able to compile on old gcc