Build fixes for when ref_ptr<> has no auto type conversion