Fixes build issue on Windows

Solves the following build issue:

error C2373: 'InitializeCriticalSectionEx' : redefinition;
different type modifiers
Merge pull request #1672 from cloudbase/master

Fixes build issue on Windows