Attempt to make Constriant work with old scipy.