This doesn't seem to make sense.
If the talked about cousin found out it can only be because either your friend or you told them. No one else is involved. If your friend told their cousin then they can hardly deny it later, and since you could only have confirmed what the cousin asked you about later, it makes no sense to consider you as having lied. On the other hand, if you told then clearly you knew so how would you have found out except from your friend ? And what point would there have been lying to drop your friend in it ? That makes no sense either.
I'd suggest forgetting the whole thing. It'll be part of a foolish forgotten past soon enough.