Changes to enable static build on winblows