A group theoretic proof of a compactness lemma and existence of nonradial solutions for semilinear elliptic equations