fix native sample to work with cygwin and mingw toolchain