Fix implicit casts of shared_ptr to bool which raises a compiler error when using C++11 shared_ptr and compiling with clang ( Apple LLVM version 5.0 (clang-500.2.79) )