Accurate field mapping in the presence of B0 inhomogeneities, applied to MR thermometry