[2.2] Add support for platforms that don't allow unaligned memory access