Lionel Messi agrees deal to join PSG