Replace text oriented stream operator << with binary safe method write

 fixes bug of libc++ under MacOS X 10.7