add IE8 support and fix bug with writing

IE8 doesn't have ArrayBuffer types, so use Object.prototype.toString
instead to detect the typed array buffer.

Fix writing binary data when running under Browserify