Make SWIG export shared_ptr and weak_ptr.