Update cmake, mingw32 and msvc builds

After b9c2748 and 22d6a97, at least the vs2008 didn't work any more. Update the cmake, mingw32, vs2008, vs2010, vs2012 and vs2013 files.

Only vs2008 tested!