To fixed the bug of INVALID_STATE_ERR: DOM Exception 11

When set the xhr.withCredentials = true before xhr.open, there will get an exception of INVALID_STATE_ERR: DOM Exception 11.

resolved method:  
  set xhr.withCredentials = true after xhr.open

OS: Android 4.2.2