Fix Clang compilation.

Use different compilation options for Clang and fix a few warnings.