A simple method which is rigorously invariant under molecular rotations is presented for evaluation of the density functional exchange-correlation energy by numerical quadrature. The corresponding expressions for the first and second derivatives of the energy with respect to nuclear displacement are presented. In particular, such a scheme is necessary to remove the difficulties previously encountered in calculating Kohn-Sham harmonic vibrational frequencies for low-lying modes.