[js] added js.Lib.require (see #2949)