add darwin support
add lastest mingw/mingw-64 tool chain support
improve command line compatibility on windows