MSWIN build fixes