add missing malloc() result casts in embedding main program code