Bind closures when using macros to allow access to $this and static.