The Greek and Hebrew words translated as "jealous" also have a meaning of "zealous." "Jealous" is not always used negatively, even in English, as seen in #4 & 5 below (from thefreedictionary.com):
jeal•ous
(ˈdʒɛl əs)
adj.
1. resentful and envious, as of someone's success, advantages, etc.: to be jealous of a rich brother.
2. proceeding from suspicious fears or envious resentment: a jealous rage.
3. inclined to suspicions of rivalry, unfaithfulness, etc., as in love: a jealous husband.
4. watchful in guarding something: to be jealous of one's independence.
5. intolerant of unfaithfulness or rivalry: The Lord is a jealous God.
[1175–1225; Middle English
jelous, gelos < Old French
gelos < Vulgar Latin
*zēlōsus= Late Latin
zēl(us) zeal +
ōsus -ose1]
jeal′ous•ly, adv.
The Exodus verse in context does fit the definition - the definition from #5 - as even this online dictionary shows. God is intolerant of unfaithfulness and rivalry and punishes it as the verse goes on to say.
The 1 Corinthians 13:4 verse is obviously speaking in negative terms, but Paul in the same letter uses the same Greek word in positive ways, and the translators treat it accordingly per context:
NKJ 1 Corinthians 12:31 But
earnestly desire the best gifts. And yet I show you a more excellent way.
NKJ 1 Corinthians 14:1 Pursue love, and
desire spiritual gifts, but especially that you may prophesy.
NKJ 1 Corinthians 14:39 Therefore, brethren,
desire earnestly to prophesy, and do not forbid to speak with tongues.
Elsewhere Paul says this, which clarifies the positive usage:
NKJ Galatians 4:18
But it is good to be zealous in a good thing always, and not only when I am present with you.
God is perfectly righteous and good. Any of His characteristics will fit this reality.