Fix some issues between new requirejs and dojo.