Fix anonymous function for php 5.3