check for __BIG_ENDIAN__ rather than for __BYTE_ORDER__ and include board.h

Most of the platforms are little endian. Since at least one version of the codesourcery toolchain defines __BYTE_ORDER__ wrong, it's safer to define this ourselves in board.h when necessary, i.e. on big endian platforms.