Turkey vows to work with Syria against ‘terrorists’