Update according to TS 0.9

'export = internal' is illegal.
Merge pull request #751 from NN---/patch-3

Update according to TS 0.9