Cross compiler getopt implementation.