Add compatibility with client side CommonJS

Fixes #4. Please note that I've never actually tried this with browserify, but it works fine with Rendr that currently uses stitch.