Replaced code deprecated in Elgg 1.9