Various windows compilation fixes.