Added isXmlHttp check

Avoid setting any flash messages when working with xml http requests.