Add support for simpler (Callable) hooks (issue #2917)