add dummy -pthread, -tsaware and --large-address-aware for executables only
handle dllimport properly in medium model
skip test for cygwin/mingw
64bit Cygwin uses SEH
define RTS_CONTROL_ENABLE and DTR_CONTROL_ENABLE for Cygwin
fix some implicit declaration warnings
fix gnat DLL prefix for Cygwin
__cxa-atexit for Cygwin

Using  __cxa_atexit(__gcc_deregister_frame, NULL, __dso_handle)
instead of atexit(__gcc_deregister_frame) directly to prevent an
optimization bug.
prevent modules from being unloaded before their dtors are called