Manchester United will play Real Madrid in a friendly in Michigan as part of manager David Moyes' pre-season preparations.