I would first check the Mozilla code base if they did fix it in a certain way and (if so) sync the sources with their repo.
I doubt they've "fixed" it, because I think we have missing files, probably something that is deep in the include chains.
I'll wrap the changes in C::B tags, this was just a demonstration patch.