Fixed warnings when compiling with clang

Added missing includes, defines and similar things
Test against the C compiler instead of cpp
Merge pull request #6 from rugginoso/feature/clang-fixes

Fixed warnings when compiling with clang