Fix array size checking on Windows