The president has received personal pleas from tech leaders including Tim Cook and Elon Musk to keep the U.S. a party to the global climate agreement.