The International Criminal Court's chief prosecutor has met with Syria's leader during an unannounced visit to Damascus.