add support for bsd getopt