build.sh: Only find the mingw compiler on Windows.
build.sh: Only find the mingw compiler on Windows.

Fixes #2269

mrjbq7/factor,AlexIljin/factor,bpollack/factor,factor/factor,AlexIljin/factor,bpollack/factor,AlexIljin/factor,factor/factor,factor/factor,mrjbq7/factor,factor/factor,mrjbq7/factor,AlexIljin/factor,tgunr/factor,bpollack/factor,mrjbq7/factor,bpollack/factor,AlexIljin/factor,AlexIljin/factor,mrjbq7/factor,tgunr/factor,bpollack/factor,bpollack/factor,AlexIljin/factor,tgunr/factor,tgunr/factor,factor/factor,mrjbq7/factor,tgunr/factor,tgunr/factor,factor/factor,bpollack/factor