Provide basic conversions to/from SharedObjectPointer (still have to work out
how to handle reference counting correctly).