Fixed cmdline parsing errors on some platforms.