Solution to swap odd and even bits in an int