MDL-57690 js: fix core modal uses in amd