Fix inherits() for older browsers
Moved function to make strict mode happy