getopt: instead of parsing undefined options, stop at first non-option

This is a configurable behaviour in C getopt, and does what I actually
wanted in the first place. If the other behaviour has a use case, it
can be reinstated later.