Fix ABCMeta under Python 3.x

See #1829