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

There are other ways. Apparently the function isn't in C++ standards, but you can e.g. request POSIX stuff by defining some macros.

http://stackoverflow.com/questions/15944051/error-fdopen-was-not-declared-found-with-g-4-that-compiled-with-g3