The deal avoids the threat of the popular app being banned in the U.S. over national security concerns.