fixes for typescript 1.1

TypeScript 1.1 was released!

It doesn't like a couple of things in our code, and it now knows about `Arraybuffer.slice`.

This makes it happy. Tested all the sample apps.