Make anonymous functions compatible with php 5.3.2