Automated shimming of B0 for spectroscopic imaging