Replace deprecated Addon::*registerHook by Hook::*register