Daily OS X fix.

Patch also fixes NetBSD and OpenBSD, but I can't test that.

<pty.h> is <util.h> on some BSDs.