Update according to TS 0.9

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

Update according to TS 0.9