ITS#9226 Fix link order for rewrite program on MinGW
ITS#9087 - Change hard-coded windres to $(RC) to support mingw cross-compiling