Adjust AMD module definition to better support r.js namespacing

r.js requires a very specific pattern for detecting AMD in order to write the define calls to support namespacing (https://github.com/jrburke/r.js/blob/master/dist/r.js#L23958). This adjusts the condition to match the expected pattern.