Moss, 49ers agree to one-year deal