Flush the stdout buffer after compiler runs

Flush the stdout buffer after compiler runs to display all the standard outputs correctly when running in NodeJS spawn. Otherwise it outputs weird result.