Fixing Typescript 0.9 Compatibility

Here are my proposed changes to bring the project up ti TypeScript 0.9. Changes are also documented in the issue I raised.

I am not 100% comfortable with using GitHub, I am normally in TFS so please bear with me!