changed some windows-specific constructions to cross-platform ones