ConDA: Contrastive Domain Adaptation for AI-generated Text Detection