Added swap32 macro to swap bytes.