Minor fixes for win32 compiler
Support rebar building on windows

Works with both cl.exe and gcc.exe in mingw, defaults to cl.exe if found.
Otherwise uses (mingw) gcc.exe, CC=gcc overrides the default compiler.