fixed a segfault when entering an unknown long option

thanks to Adam Rosenfield (http://stackoverflow.com/questions/20668530)