add main field to package.json so that module can be required
use 'this' as a root only if 'window' object isn't available
Fixed CommonJS module bug
Updated travis file
Merge pull request #105 from cferdinandi/pr/102

Fixed CommonJS module bug