make it more cross-patform by detect presence of C++ compiler and endian.h file
try to support original OpenBSD endian convertion macros