initialize XpWiki->extension

fix "Warning [PHP]: Creating default object from empty value"
fix "Notice [PHP]: Array to string conversion" in search.php