Provide mw.hook when not provided by older MediaWikis

Change-Id: I8d0826722064551cc46be26215ffb954f39babb0
Merge "Provide mw.hook when not provided by older MediaWikis"