objclosure: Fix printing of generator closures.

The code previously assumed that only functions can be closed over.