Fix the compilation on Linux/OS X with gcc and clang

Hello

Here are a few changes I add to do to compile the library on my machines.

Tested on:
- Ubuntu with *gcc 4.7.2* and *Ubuntu clang version 3.0*
- OS X 10.9 with *Apple LLVM version 5.0 (clang-500.2.79)*