Fix for jdk6, which does not have unsafe.freeMemory()