compatibility with architect-build

allow exporting functions from mini_require.js
and fix require for worker
@lennartcl 
trivial