make xdomain work with require/amd