Adjust to latest libcappy(std::function instead of templated functor).