Fix Windows incompatibilities