Mingw32 support

Added Mingw32 support so we can drop the MSVCRT##.DLL depend
Also change the DLL code to use plain C