The president said he is prepared to close the southern border if Mexico does not block migrants from entering the U.S.