Support commonJS

This change will have to be published to npm as well.