Fix typescript API

Unfortunately there is no complete control over how typescript generates
the amd module, so callers will have to be modified. Not much, though.