Bugfixes for gcc 4.8

Not sure why g++ doesn't want to implicitly convert NULL to the
appropriate pointer type here, but since the default shared_ptr
constructor has equivalent behavior let's use that to be safe.

"make check" succeeds now.