This commit fixes usage of the Singleton metaclass so that it is compatible with both Python 2 and Python 3.