Fixing shared_ptr that is ambigious under c++11 compilers (like clang on OSX)