The Netherlands does not have a consulate in Madagascar, it has an honorary consulate (consulaat honorair). These are very different things.
A consulate is an office staffed with career diplomats that can sort out visas and emergency passports and whatnot; from a traveler's POV, it's basically an embassy that happens to be outside the capital. (See herehere for the full scoop.)
An honorary consulate is a house with a shiny plaque on it, staffed (usually) by a local worthy, who will likely not even be a citizen of the country they represent. If you call or visit, they will say "oh dear", offer you a cup of tea if you're lucky, and call the embassy/consulate when it opens. As a typical example, here is how Finland describes their honorary consuls and what they can do:
An honorary consul monitors the rights of Finns and foreigners permanently residing in Finland. He or she provides advice and guidance for distressed Finnish citizens and foreigners permanently residing in Finland who are temporarily abroad, assisting them in their contacts with local authorities or the nearest Finnish embassy or consulate.
On the upside, while the honorary consul is unlikely to be able to help you very much, they will be able to direct you to whoever can help. Odds are pretty high that this is the nearest Dutch embassy though, since while an honorary consul can't do much, the embassy of another country can probably help you even less.
Update: The EU site lists one situation: if you've lost your passport, and "your country has no embassy/consulate in that country with the capacity to issue a travel document" (an honorary consulate will virtually never have that capacity), another EU country's embassy may assist you in getting an emergency travel document.