Twins and Joe Mauer agree to contract