IRS reallocates losses of joint venture among foreign and domestic partners