Capture locals from enclosing env on function definition. Fixes #28.