Optimised async loading of cross-domain scripts