Only call System.gc() if OS is Windows (see previous commit)