Fix Windows compilation errors