set headers after xhr open to prevent invalid state exception
Merge pull request #68 from trilobyte/fix-set-headers-after-xhr-open

set headers after xhr open to prevent invalid state exception