Switch to custom byte swapping function.

GCC builtins like __bswap_32 are not portable between versions.
I know we *can* do it, but is it necessary? Like I said, this didn't generate a warning.