Start switching to anonymous functions.

Props yoavf.
See #305.
Update our minimal version to PHP 5.3

Props cfoellmann.
Fixes #376.