Added alternative checks for endianess detection

Currently used checks doesn't work on GCC+Solaris+SPARC.