Replaced mutex with CRITICAL_SECTION

Mutex requires a call to the kernel which greatly affects performance.
Unless cross-process threading is needed this is a better alternative.