getopt: merge bug fixes from glibc