Declare methods called statically from hooks as static.

This fixes strict warnings by PHP.