Fix encoding/decoding of string literals for big-endian systems