Magnetostriction in rare-earth based antiferromagnets