made it compile and link on Widnows (as static library)

This is a rather quick-and-dirty hack to make it usable on Windows.