The Gr"a answers (Divrey Eliyahu) that, as stated in the Haggada, it was Hashem himself who carried out the Death of the Firstborn. The idea of the "mashchis" that could not harm the Jews was that there were some people whose time had come to pass away that night, and had Hashem allowed the Angel of Death to take them as planned, the Egyptians would claim that they had died in the plague. Therefore, Hashem did not allow the "maschis" to touch any Jew, and pushed of the death of those who were destined to die on that night.
However, the Chasam Sofer (Shu"t YD 346:12) question the possibility that the Egyptains were killed directly by Hashem. We are told that Moshe and Aharon had the great merit of dying through "Missas Neshika" (a Divine Kiss by the Hashem himself); how could we possibly say that the Egyptians got this great privilege. He therefore explains that although Hashem wanted to send an emissary to smite the Egyptians, they were protected by their "mazel" which is called (see Zohar 3:250b) the "firstborn" and strongest of the "mazalos" and would not allow anything to harm them. Therefore Hashem had to first "do away" with their "mazal", before being able to send his messengers to kill their firstborn. When the verse says "וה' הכה כל בכור", it is actually referring to Hashem (personally) killing the "בכור" - the mazel of the Egyptians, which later enabled the "mashchis" to kill them.