Copy add_metaclass from the 'six' module

This removes the need for six to be installed.