Selfinjective algebras of polynomial growth