Work around open() bug on HP-UX 11 and Solaris 9.