Buffer stdout on windows due to poor printf performance