Allocating 1MB of stack produced a stack overflow on windows and chkstk was very unhappy. The buffer is now statically allocated. Fixed windows build with strnicmp instead of strncasecmp.