Factorize common commandline options definition.