support requirejs. Fixes #5