Properly handle staticExec() generating large output.

A staticExec() invocation that generated more than the internal
buffer size worth of output blocked because the compiler waited
for the process to terminate before reading the output.
Merge pull request #1524 from rbehrends/fix-staticexec2

Properly handle staticExec() generating large output.