Exploiting Global Graph Homophily for Generalized Defense in Graph Neural Networks