main: fix bad getopt setting for -g option

The -g option takes an argument but that was not specified in the
getopt() call.