Modified ref.h to use std::reference_wrapper when compiled with clang in c++11 mode.