Fix metaclass issue in PY3, refs #38.