fix refcountsupport code when using HELIUM_HEAP