Fix missing addhook() method call.

Thanks David Monniaux for reporting that problem.
5 jobs from master in 42 minutes and 59 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #9038
jars-j8

00:00:39

passed #9037
java8

00:16:31

 
  Test
passed #9041
allowed to fail
java11

00:12:14

passed #9039
java7

00:13:33

canceled #9040
allowed to fail
java11

00:26:03