This requires _WIN32_WINNT >= 0x0600.
If someone wants to spend effort on supporting earlier versions, one can easily add another fallback implementation based on critical sections, or try to load SRW lock functions dynamically.
This makes sure that the FDE cache is thread safe on windows.
Maybe you want to check _MSC_VER here? I think MinGW compilers will have pthread support.