Remove anonymous function so works on php < 5.3

Anonymous function breaks plugin for php < 5.3. Seems to work otherwise. Quick fix.