windows compilation fixes