NEC says that you can replace a switch where no grounding conductor exists, though you'll have to use a nonconducting, noncombustible faceplate. For clarity, I'd leave the grounding conductor from the switch disconnected. That way if anybody comes along in the future, they won't be confused and think the enclosure is grounded.
National Electrical Code 2014
Chapter 4 Equipment for General Use
Article 404 Switches
404.9 Provisions for General-Use Snap Switches.
(B) Grounding. Snap switches, including dimmer and similar control switches, shall be connected to an equipment grounding conductor and shall provide a means to connect metal faceplates to the equipment grounding conductor, whether or not a metal faceplate is installed...
Exception to (B): Where no means exists within the snapswitch
enclosure for connecting to the equipment grounding
conductor or where the wiring method does not include
or provide an equipment grounding conductor, a snap
switch without a connection to an equipment grounding
conductor shall be permitted for replacement purposes
only. A snap switch wired under the provisions of this exception
and located within reach of earth, grade, conducting
floors, or other conducting surfaces shall be provided
with a faceplate of nonconducting, noncombustible material
or shall be protected by a ground-fault circuit
If this box does indeed have a grounding conductor attached, as @Speedy Petey suggests. Then you can use a grounding screw, or a grounding clip to attach the grounding conductor from the device to the box.
The clip attaches to the edge of the enclosure, while the screw can be screwed through the threaded hole in the back of the box.