Substitute 2 teaspoons of commercial curry powder in place of the mustard seeds, cumin, coriander, and turmeric, if you wish.
In a heavy kettle or Dutch oven, saute the onion in the oil until soft. Add the mustard seeds and roast them at medium heat, stirring for about 30 seconds, until they begin to pop. Add the garlic, spices, salt, and brown sugar, and cook for several minutes, stirring constantly. Then add the squash and turn it to coat with the spiced mixture.
Add the water and bring to a boil, stirring occasionally. Stir in the coconut and cook for about 15 to 20 minutes, or until the squash is tender and the liquid has almost cooked away.