Get getopt from unistd.h (not getopt.h) in tests

POSIX defines getopt to be declared in unistd.h, and HP-UX (as of
version 11.31) does not appear to have getopt.h.  In test programs
which currently include getopt.h and aren't currently built on
Windows, include unistd.h or just assume we will get it via k5-int.h.

ticket: 7894 (new)
target_version: 1.12.2
tags: pullup