Corrections of code deprecated since Elgg 1.8