Linux fixups from Windows port