Modified checkCrossDomain and checkEndeca to work with python 3