Add const attribute to byte-swapping functions