BENCH: fix optimize.BenchGlobal.  Closes gh-7658.
BENCH: fix optimize.BenchGlobal.  Closes gh-7658.

Checked that this works now:

    SCIPY_GLOBAL_BENCH=AMGM python runtests.py --bench optimize.BenchGlobal

Thanks to @pv for suggesting the solution.

[ci skip]

jamestwebber/scipy,e-q/scipy,lhilt/scipy,scipy/scipy,aeklant/scipy,jor-/scipy,ilayn/scipy,zerothi/scipy,aeklant/scipy,vigna/scipy,anntzer/scipy,endolith/scipy,anntzer/scipy,matthew-brett/scipy,pizzathief/scipy,lhilt/scipy,tylerjereddy/scipy,ilayn/scipy,gfyoung/scipy,matthew-brett/scipy,WarrenWeckesser/scipy,nmayorov/scipy,e-q/scipy,jor-/scipy,vigna/scipy,arokem/scipy,scipy/scipy,Stefan-Endres/scipy,gfyoung/scipy,perimosocordiae/scipy,tylerjereddy/scipy,andyfaff/scipy,arokem/scipy,scipy/scipy,zerothi/scipy,vigna/scipy,mdhaber/scipy,person142/scipy,gfyoung/scipy,jor-/scipy,nmayorov/scipy,endolith/scipy,gertingold/scipy,andyfaff/scipy,nmayorov/scipy,rgommers/scipy,Eric89GXL/scipy,WarrenWeckesser/scipy,anntzer/scipy,pizzathief/scipy,Stefan-Endres/scipy,scipy/scipy,ilayn/scipy,jor-/scipy,WarrenWeckesser/scipy,ilayn/scipy,gertingold/scipy,jamestwebber/scipy,pizzathief/scipy,jamestwebber/scipy,perimosocordiae/scipy,mdhaber/scipy,matthew-brett/scipy,zerothi/scipy,grlee77/scipy,perimosocordiae/scipy,jamestwebber/scipy,lhilt/scipy,Eric89GXL/scipy,arokem/scipy,arokem/scipy,WarrenWeckesser/scipy,person142/scipy,pizzathief/scipy,aarchiba/scipy,grlee77/scipy,gfyoung/scipy,aeklant/scipy,gertingold/scipy,endolith/scipy,pizzathief/scipy,WarrenWeckesser/scipy,endolith/scipy,aeklant/scipy,tylerjereddy/scipy,Eric89GXL/scipy,aeklant/scipy,Stefan-Endres/scipy,Eric89GXL/scipy,lhilt/scipy,e-q/scipy,tylerjereddy/scipy,Stefan-Endres/scipy,matthew-brett/scipy,zerothi/scipy,zerothi/scipy,Eric89GXL/scipy,jamestwebber/scipy,andyfaff/scipy,andyfaff/scipy,aarchiba/scipy,person142/scipy,lhilt/scipy,nmayorov/scipy,rgommers/scipy,perimosocordiae/scipy,Eric89GXL/scipy,rgommers/scipy,mdhaber/scipy,andyfaff/scipy,person142/scipy,gertingold/scipy,ilayn/scipy,e-q/scipy,tylerjereddy/scipy,anntzer/scipy,zerothi/scipy,jor-/scipy,aarchiba/scipy,gfyoung/scipy,aarchiba/scipy,rgommers/scipy,scipy/scipy,ilayn/scipy,vigna/scipy,perimosocordiae/scipy,nmayorov/scipy,Stefan-Endres/scipy,scipy/scipy,grlee77/scipy,mdhaber/scipy,rgommers/scipy,anntzer/scipy,aarchiba/scipy,matthew-brett/scipy,WarrenWeckesser/scipy,e-q/scipy,arokem/scipy,endolith/scipy,mdhaber/scipy,anntzer/scipy,perimosocordiae/scipy,grlee77/scipy,Stefan-Endres/scipy,grlee77/scipy,person142/scipy,endolith/scipy,andyfaff/scipy,vigna/scipy,gertingold/scipy,mdhaber/scipy