Effect of local rotations on the optical response of LiNbO3: Application to ion-beam damage