After reviewing the build, Debian's couchdb uses --enable-js-trunk to bypass the 1.1.1 restrictions on libmozjs versions. That answers my question.
I'm attaching a patch which basically puts the functions for _users and _replicator design documents in parentheses so that they work. S.
diff --git a/src/couchdb/couch_js_functions.hrl b/src/couchdb/couch_js_functions.hrl --- a/src/couchdb/couch_js_functions.hrl +++ b/src/couchdb/couch_js_functions.hrl @@ -11,6 +11,7 @@ % the License. -define(AUTH_DB_DOC_VALIDATE_FUNCTION, <<" + ( function(newDoc, oldDoc, userCtx) { if (newDoc._deleted === true) { // allow deletes by admins and matching users @@ -94,10 +95,12 @@ throw({forbidden: 'Username may not start with underscore.'}); } } + ) ">>). -define(REP_DB_DOC_VALIDATE_FUN, <<" + ( function(newDoc, oldDoc, userCtx) { function reportError(error_msg) { log('Error writing document `' + newDoc._id + @@ -235,4 +238,5 @@ } } } + ) ">>).