Fixes to requirejs define blocks
Fixed require.js support following instructions from https://github.com/jrburke/r.js/issues/558#issuecomment-33546625