Thanks, we'll consider that suggestion. The possibility that dirent.h would be present on Windows hadn't been taken into account.
For what it's worth, official releases of KS have typically been tested under Windows using an MSVC custom-compiled Perl. It used to be that if we could get KS to build and pass tests under MSVC, it would also build and pass tests under Cygwin and Strawberry Perl. Recently, we've been having some difficulties -- but Windows is definitely a target OS, and we look forward to resolving these problems.