Cross platform fixes...

Fixed Windows compilation under MinGW...