Avoid new-style classes under Python 2.6.

Little ugly fix, required because Python 2.6's logging uses old-style
classes.  Thanks for finding this one, @deferraz.