Use AttributeError for static binding protection

Replace usage of RuntimeError with AttributeError in the dummy module
protecting importing of static bindings. This is needed so we don't break
modules like inspect which is used by ipython.