Replaced code deprecated in Elgg 1.9.
Merge pull request #52 from juho-jaakkola/deprecated-19

Replaced code deprecated in Elgg 1.9