Fix build and installation on cygwin