adding mutex protection to MetaObjectRegistry.cpp