Fix building error under mingw

Two building error under mingw fixed

* `cc: error: unrecognized option '-build'`
* `C:\Users\xxx\AppData\Local\Temp\ccLfW9xj.o:main.c:(.text+0x13af): undefined
 reference to `GetOpenFileNameA@4'`