Be compatible with PHP 5.3, self isn't allowed in closures until 5.4

Bug: 65369
Change-Id: I16e0249cf1821caa817f056c83a025288a15efb9