Soften gelatin in 1/4 cup of the milk.
Blend sugar, cornstarch, and salt in a medium-sized pan; gradually stir in remaining milk.
Cook over low heat, stirring constantly, until mixture thickens and boils.
Remove from heat, beat egg yolks slightly, and stir a small amount of the hot liquid into the egg yolks.
Add the egg yolk mixture to the remaining hot milk mixture, return to heat, and continue cooking, stirring constantly, for 2 minutes.
Remove from heat and blend in the softened gelatin, butter, and flavorings; cool until lukewarm.
Beat egg whites until stiff but not dry; fold egg whites with 3/4 cup of the coconut into the cooled custard.
Pour into the pastry shell, and chill.