Zacharias and Elizabeth were declared righteous before God by the works of the law.
If the law cannot save, how were OT saints saved? Show us any OT passages which state how they received life. I'll give you this passage from Ezekiel to show how they received life.
Ezekiel 18:21
But if the wicked will turn from all his sins that he hath committed, and keep all my statutes, and do that which is lawful and right, he shall surely live, he shall not die.
The Biblical example that is set forth for us according to this verse is the story of Jonah and Ninevah.
Notice here in verse 10, Jonah 3:10 "And God saw their works, that they turned from their evil way; and God repented of the evil, that he had said that he would do unto them; and he did it not."
This is speaking of their city being physically destroyed, how do we know? Verse 9, Jonah 3:9 "Who can tell if God will turn and repent, and turn away from his fierce anger, that we perish not?"
Because Jonah warned in prophecy that Ninevah would be overthrown, Verse 4, Jonah 3:4 "And Jonah began to enter into the city a day's journey, and he cried, and said, Yet forty days, and Ninevah shall be overthrown."
The verse in Ezekiel 18:21 speaks of a man repenting of his sins so that the Lord spare him in this life, as the Bible gives us an example of in Jonah; otherwise, you're going to have to find at least one example in the Bible of a man repenting of his sins to be given salvation (eternal life, not simply mercy in this life), which doesn't exist.
However, the Bible is clear that a person is saved by calling upon the name of the Lord (Romans 10:13, Acts of the Apostles 2:21, Joel 2:32).
Keeping in mind that God doesn't change (Malachi 3:6), his method of salvation wouldn't change. How do we know? Because we see men calling upon the name of the Lord way back in Genesis 4:26, and if you study the amount of years, Adam himself was still alive at this time: so men were calling upon the name of the Lord even since the first man was alive, which proves the same method for salvation: grace through faith in the Lord God. Just as Abraham was saved by faith (Romans 4:3), everyone before and since has been saved by faith. Noah found grace in God's eyes (Genesis 6:8), proving salvation by grace, howbeit it was both physical and spiritual salvation nonetheless, just as Enoch was saved and translated by God that he should not see death through faith (Genesis 5:22, Hebrews 11:5).
As you can see, the Bible obviously creates and testifies of a pattern in regards to salvation. It's obvious with any little study that God's method of salvation has always been purely grace through faith. It wouldn't be any different ever, because then the judgement of God would be a false balance, and a false balance is an abomination to the Lord (Proverbs 11:1), so because God's righteous and merciful, salvation has always been the same, so that all may be drink of the water of life freely (Revelation 22:17); coupled together with the law of God, with those who know the law, everyman is without excuse, for the law makes all guilty before God (Romans 3:19-20). Does all guilty before God sound like salvation to you?
Not to mention, if you claim salvation by the law in the Old Testament, how do you explain the salvation of men prior to the coming of the law? Because the Bible is clear that Abraham was saved by faith before circumcision, which was the seal of the covenant (Romans 4:10-12), making Abraham the heir of the world by faith and NOT according to the law (Romans 4:13).
Oh, and also: Christ is the Lamb slain from the foundation of the world, so it wouldn't make a difference if the saints believed on him before he came or after he came - it's still the same Savior since eternity.