Port the getopt_long to getopt for win compat