Upgraded stdin handling for node v0.10.