Fix handling instantiation errors
Only process known MIT config keys
Python 3 no longer supports .has_key() on os.environ