Characterizing polynomial domains by their automorphism group