getopt sources and header taken from binutils-2.24.51