requirejs plugin to replace global variables