Fix some aliasing issues in byte_swap

Signed-off-by: Rick Taylor <rick@tropicalstormsoftware.com>