Fix metaclass issue in PY3, refs #38.

This is they way six does it under the hood.