loader: added shim_require, fixed shim_define