Added minor Windows support, now fully ANSI C.