[fix] make library requirejs friendly