Constrain windows.h includes to msvc path. Undef win api CreateSemaphore. Tested with mingw and vs2012.
Merge pull request #191 from logzero/vs

vs2012 fixes