Edit RequireJS snippet to support namespacing

The r.js optimizer checks for a predefined if statement to rewrite when
running with the 'namespace' option set.