Fixes #2610 - Replaces variable functions with call_user_func()

Fixed version of https://github.com/Elgg/Elgg/pull/473