AZ Alkmaar have confirmed that Johann Berg Gudmundsson is leaving the club this summer when his contract expires.