async require for the browser, also works in node