base: requirejs fixes for asset compilation

* Fixes to allow running with ASSETS_DEBUG=False which
  compiles all assets using r.js

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>