changes to accommodate unpatched pdksh 5.2.14 (the shell on OpenBSD and NetBSD)