optimized byteswapping for gcc