fixed building on Cygwin, various others