Fixes #6035: Allows passing $params variable to Elgg event handlers