Tensor representation of magnetostriction for all crystal classes