Rangers will donate any gate receipts from their William Hill Scottish Cup tie against Dundee United to charity.