Move xhook addCredentials into xdomain constructor

Move the xhook addCredentials setting into xdomain constructor otherwise when using with an AMD loader xhook is undefined as not in global scope.

Not sure what your strategy is on the dist files in the repo - let me know if you don't want the updates files committed.

Thanks for the great work by the way :thumbsup: