taken from https://github.com/bincrafters/conan-libmicrohttpd/tree/stable/0.9.59
heavily modified to build under MSVC