Unintrusive modifications to make it work under Cygwin.