Support C++ standard < C++11

If C++11 not available, use std::tr1