Add extension ops entry to bytecode header and fix offsets.

The writer still needs to be adjusted.
Write new bytecode header