Fixed CMakeLists to compile correctly on windows

-If using MinGW32, you need to add -lmingw32 and -mwindows
 to the linker options, otherwise you'll get Undefined Reference
 to WinMain@16.