[PATCH 6/9] Make getopt_long handling more robust