fix bug in byte orders. detect sizeof(ssize_t), if possible