25% faster expmod.
Support using unicode kid header.