Fix MSVC 2013 compiling error C2440. Return shared_ptr as bool.

I always had this compiling error in Windows. Would you please merge this, thanks!