Improve handling of wantsol and -AMPL options