Make endian-conversion macros always return correct types (bug 16458).