Metaclass compatablity with python 3