more windows build tweaks, warnings and linking