fix windows architecture detection, make compat with cygwin x86 and x64