Fix -W with optional parameters in getopt.