There is now an interface for option maxit.

(manually cherry picked from commit e2b42382ee95f8e25755e54ac4afbbdfee93cc7b)