Add n-ary function support for .nl solvers.