Find CommonJS in a lint-friendly way

Travis is failing because of a lint error on double equals. This is a better way of determining CommonJS.