fix scanner hooks, cant use  inside closures in php 5.3
dont need to explicitly pass by reference
remove unneeded 'use'
Merge pull request #4208 from owncloud/scanner-php53

Fix scanner hooks throwing errors