Fix bug when getopt_long is not available.