Hi Christian,
after some changes in zimlib I decided to apply your patch. Unfortunately there are some problems.
I changed zim.h not to query _WIN32, so there is no need to undef it there. Can you check, if it needs to be undefined elsewhere? It is checked in src/uuid.cpp. Is it a problem? Maybe we need to undefine it there?
What about unistd.h? Why it is needed it uuid.cpp?
I added the other files into the repository.
Tommi