Magnetic order in 2D antiferromagnets revealed by spontaneous anisotropic magnetostriction