migration to GNU getopt