Fix mutexes on Windows and Windows Phone