Defending LLM Watermarking Against Spoofing Attacks with Contrastive Representation Learning