feat(js) set global option can replace require('xx') to global variable

Closes spmjs/spm#1078 #24