There is an issue with building zlib using MinGW.  Using a modified version of
your patch, I am able to build zlib.  However, the "awk" line caused problems
for me here (i.e. complaints about being unable to locate the "cc" command).