SJCL work.  Fixing x-domain detection