Cross compile for win32 now working

Minor code modifications to make it build for Win32 platform via mingw
cross compile (only tested on Fedora 20).  Still can't run it via wine,
because it gripes about the platform plugin being missing, but it is
building fine now.  Not sure what magic I'm missing on running it in
wine.