Fix the plague that is windows.h fighting with glm::min/max

The real issue is that we should probably use C++11 here for mutex.
However, since I want this mostly portable, I don't want to rely on C++11 too much.
So, a better solution would be to create a private implementation.