Fix scripts to work with minGW.