Looks like the reference implementation was just copied; the comment about changing the native endianness to match your platform is still present.