Find CommonJS in a lint-friendly way

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