Reconstructing spatially variable mass balances from past ice extents by inverse modeling