fix windows compilation errors