Minor fixes for windows compilation.
Some nice fixes to the compilation scripts.