misc.spawn node 0.8 compatibility: stdio data may come after exit.

[`child_process` API changes between v0.6 and v0.8](https://github.com/joyent/node/wiki/API-changes-between-v0.6-and-v0.8):
> * the `'exit'` event is now emitted right after the child process exits. It no longer waits for all stdio pipes to be closed.
> * the `'close'` event was added that has is emitted after the child has exited and all the stdio pipes are closed.

For node 0.8 compatibility, while keeping compatibility with older version of node, I used the stdio stream `'close'` event to avoid losing any `'data'` events that can occur after the `child_process` `'exit'` event.