support both mingw g++ and msvc

TODO: move to common place, add vc shortcut