fixed failing build on php 5.3 by avoiding to use $this in callback