Statistical Mechanics of Dynamical Systems with Integrals Other than Energy