fix detection of cross-origin -ness