Switch to custom byte swapping function.

GCC builtins like __bswap_32 are not portable between versions.
Aliasing violation.  Also, the function works for both directions of le <-> be conversion.
The cast-free way to do this is:
```
typedef union { uint32_t word; char[sizeof(uint32_t)] bytes; } bsint32;
static inline uint32_t ByteSwap32(bsint32 src)
{
    bsint32 dst;
    dst.bytes[0] = src.bytes[3];
    dst.bytes[1] = src.bytes[2];
    dst.bytes[2] = src.bytes[1];
    dst.bytes[3] = src.bytes[0];
    return dst.word;
}
```
It still violates aliasing rules, but at least it does it without casts !