minor fixes to get compiling under TS 0.9.0