support scipy < 0.9, missing minimize