MOSYNC-3131. Fixed mutex used for CRITICAL_SECTION.