No ticket. Abstract conditional hook definition.

Shaves off 12 bytes minified gzipped.

The mechanism used to define hooks requiring lazy supports is repeated: first define the hook unconditionally as a function first executing the support test and later either removing itself or redefining to just execute the hook function without repeating executing support tests.

Analogous PR for `master`: #1354.