Add requirejs module support

Fixes #10.