pty_open: Fix warnings with BSD codepath
pty_open: Fix warnings with BSD codepath

Fix warnings by conditionally compiling functions needed for the
UNIX98_PTY codepath.  Also, make a function static.

https://bugzilla.gnome.org/show_bug.cgi?id=724780

gicmo/gvfs,gicmo/gvfs,gicmo/gvfs,gicmo/gvfs