Fixed language linkage issue under clang-500.2.79

The declarations must be located before the respective friend
declaration to have a correct C language linkage.
Fixed c++11-narrowing errors for C++11 compatibility

char(0x80): constant expression evaluates to -128 which cannot be
narrowed to type 'unsigned char'
      [-Wc++11-narrowing]
Fixed string+int issues in headers
Merge pull request #9 from QuentinFiard/pr1

Compatibility fixes with latest Clang/LLVM compiler and C++11