Get refcounter to build with LOW_MEMORY defined