Working on MAC OS X

By removing the *Sync calls we can now read from stdin even on a Mac.