Fixed Windows compilation issues