Update lib/api.xsjs fixes #32