Toplevel: hack to allow loading of cma files with shared libraries

Clearly, shared libraries are not actually loaded. So, the primitives
must have to been defined in JavaScript beforehand.