Add MgObject::addRef().