Fixed two bugs in 59a35208.

* StandardError doesn't exist any more under Python 3.
* Python 2.6 still allows `raise "foo"`.