Resolve issue with 'this.each' being undefined in RequireJS context.