Classically perfect gauge actions on anisotropic lattices