modified so building on windows in cygwin works