fixes for Windows compilation