BUG: optimize: fix bug in minpack error handling string formatting on Py3

Somewhat straightforward bugfix for Python 3. (`__name__` is unicode)