Cygwin fixes for running SITL mode on Windows

This patch allows APM's SITL mode to be used directly in Windows (via Cygwin).