[bugfix] Dont use bitmasks for endianness reasons

The use of bitmasks breaks the code on big endian
machines here.