fix warnings and errors related to object_id on all ruby versions