Work around node.js bug https://github.com/joyent/node/issues/1669 where stdout buffer is not flushed at process exit and console.log()s performed by the application might not get printed. Fixes https://github.com/kripken/emscripten/issues/2582
Merge pull request #2587 from juj/workaround_nodejs_stdout_exit

workaround_node_js_stdout_exit