Fixes for Windows compilation.