Try to use extended getopt, fall back to bsd if it fails