Fix build on big endian system

Fixes #11136