Build on MinGW Windows targets fails.
For the last two releases, cross-compiling for Windows under the MinGW system has been failing due to a missing
struct stat definition. The following patch fixes the problems and allows compilation. I don't know if it's the optimal fix, but it does resolve my problem.