ifdef refcount debug access to fix build failure when refcounting is not available