getopt_long: Support abbreviated option matching

From the getopt_long manpage:

    Long option names may be abbreviated if the abbreviation is unique
    or is an exact match for some defined option
strcmp: Remove unnecessary check for *r

If *l == *r && *l, then by transitivity, *r.