The Elder Wand responded to Harry
Mastery of the Elder Wand
In the relevant passage from the books, we see Harry cast his signature Expelliarmus spell (using Draco's wand) against Voldemort's signature hhhh-Avada Kedavra curse (using the Elder Wand), at which point the Elder Wand recognises Harry as its true 'master':
The bang was like a cannon blast, and the golden flames that erupted between them, at the dead center of the circle they had been treading, marked the point where the spells collided. Harry saw Voldemort’s green jet meet his own spell, saw the Elder Wand fly high, dark against the sunrise, spinning across the enchanted ceiling like the head of Nagini, spinning through the air toward the master it would not kill, who had come to take full possession of it at last.
-Harry Potter and the Deathly Hallows, Chapter Thirty-Six (The Flaw in the Plan).
Harry has a hunch that this would happen, he tells Voldemort just before that it comes down to whether or not the Elder Wand will realise that Harry had disarmed Draco already:
“But you’re too late,” said Harry. “You’ve missed your chance. I got there first. I overpowered Draco weeks ago. I took this wand from him.”
Harry twitched the hawthorn wand, and he felt the eyes of everyone in the Hall upon it.
“So it all comes down to this, doesn’t it?” whispered Harry. “Does the wand in your hand know its last master was Disarmed? Because if it does . . . I am the true master of the Elder Wand.”
I wander if it matters
It doesn't sound like it would have mattered if Harry had used Draco's wand, or a totally different wand or an umbrella; the Elder Wand recognised Harry as the true owner and didn't kill him. Note how in the passage above it says Harry is "the master it would not kill", so under no circumstances was Harry in trouble. The Expelliarmus was just a way for Harry to disarm Voldemort and retrieve his Elder Wand.
Books vs. Movies
The confusion in this situation may have been caused by the fact that in the movie, the two spells 'collided' with each other and did that Priori Incantatum lock thing (even though the cores of the wands were not related in any way), which caused the Elder Wand to eventually and literally break under the pressure. This specifically doesn't happen in the books.