Fix compilation errors on Windows (and one on Linux)