Fix endian detection in bundled test

Since we compare to a little-endian reference buffer and the library
generates native-endian 16-bit data, convert the buffer before comparing
if we're running on a big-endian machine.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>