Added endianness support to ifreg