windows fixes

Some trivial fixes for windows build.