Fix writing of book header on big-endian architecture.