modified to generate self-hosting libzen