Add GC.copy_on_write_friendly support