Fixed isSameDomain

Originally uploaded improper code that would always result in false.