If you have some issues to replicate `$(XULRUNNERSDK) $(XPCSHELLSDK) ../../build/r.js -o build/require_config.jslike` by using r.js as a library, you may just fake globals to act as a command line call.
You may just have to remove `requirejsAsLib` and put something like `["-o", "build/require_config.jslike"]`.