Fixes for Typescript 0.9.5