On the compactness of the automorphism group of a domain