Javascript async dependency loader