fix non c++11 evaluation of shared_ptr