Allow passing in an xhr instance.