Wraps an expression with 'std::cref' if it is available.