Switch to custom byte swapping function.

GCC builtins like __bswap_32 are not portable between versions.
Asserting that ``uint32_t`` is four bytes? That, IMHO is completely overkill. The name of the type alone guarantees this.