Fix compatibility with MediaWiki 1.24