Allow custom xhr factory similar to jQuery.