loader: add shim for define to wrap 3rd party modules