Towards Effective Semantic OOD Detection in Unseen Domains: A Domain Generalization Perspective