Make `@deprecated` decorator work for classes.