MOSYNCLIB-27: Important changes to make it possible to build on Windows 8