Some trivial fixes to make Nix working on Cygwin again

These changes allows me to build and run Nix on Cygwin (both i686-cygwin and x86_64-cygwin) again, if I compile it as follows:

./configure --disable-perl-bindings
make BUILD_SHARED_LIBS=0
make BUILD_SHARED_LIBS=0 install