Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64

Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
Fix pointer -> integer casts on IL32P64 systems

This commit touches poll.c from Gnulib, which was fixed upstream in 2012.

Wrt ShellExecute, see [1].

[1]: http://blogs.msdn.com/b/oldnewthing/archive/2006/11/08/1035971.aspx
git-compat-util.h: fix integer overflow on IL32P64 systems
MINGW: config.mak.uname: add explicit way to request MinGW-build

When crosscompiling, one cannot rely on `uname` from host system.
Thus, add an option to use `make MINGW=1` for building MinGW build
from non-MinGW host (Linux, for example).

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
MINGW: compat/poll/poll.c: undef NOGDI

On MinGW-W64, MsgWaitForMultipleObjects is guarded with #ifndef NOGDI.

Removal -DNOGDI=1 from config.mak.uname has an undesirable effect of
bringing in wingdi.h with weird #define ERROR 0 that conflicts with
internal Git enums. So, just #undef NOGDI in compat/poll/poll.c.

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>