MinGW-64 fixes

When compiling for a windows target, this patch removes the need for embedded dlls & includes when on a non-windows host, for example on linux-mingw, when headers and common libs can be easily found.

It also fixes a few build issues in the source with mingw-w64-gcc 4.9.1.