The answer would seem to be that magic really worked in those days. Now the question becomes why did it stop working?
The answer is that to enable free choice Hashem has to create balance in the world. In a world where there is נבואה there needs to be a counterbalancing force, otherwise belief in Hashem would be coerced. Therefore, magic worked.
We find this idea expressed in a number of other places as well.
The gemara in Shabbos comments that כפה עליהם הר כגיגת by matan torah. The obvious question is didn't they say נעשה ונשמע, meaning that they excepted the Torah willingly? The Meshech Chochma answers that the gemara is meant to be taken allegorically. The revelation when Bnei Yisrael left Egypt, krias yam suf, and matan torah was so great that it was as if Hashem forced them to accept the Torah. The revelation was so great that they could not say no, Hashem's presence in the world and Torah's importance were self understood like the sun is shining. They understood that if they did not accept the Torah the world would be destroyed, not as a threat but as a fact, as reality. In other words, their free choice was taken away by the tremendous revelation.
The Anshei Knesses Hagedola asked Hashem to be mevatel the yetzer hara for avoda zara at the beginning of the second beis hamikdash and Hashem agreed. However, as a consequence, נבואה ended as well. נבואה can not exist in the world without a counterbalancing force.
Likewise, magic cannot exist without a counterbalancing force like נבואה and miracles. Since we don't have these magic doesn't work as well.
This idea also explains how/why Hashem hardened Pharoah's heart. The revelation of the makos took away his free choice, the hardening of his heart restored that balance.