Model for the composition-dependent ferromagnetic to antiferromagnetic transition in Fe2Ti