Portable, reentrant, getopt-like option parser