PY3 fix metaclasses. See #1829.
Merge pull request #1836 from kmike/master

Fix ABCMeta under Python 3.x