Allow shared_ptr implementation to be selected.

Fixes #6.