Apply a patch from Richard Christman to support Windows compilation.