Add runtime detection for mingw/VS build config.