Fix endian conditions on Solaris. From Alexander Esilevich.