Fixed Windows compilation problems