Add some compiler flags needed for GCC and Clang.
Fix compilation with GCC and Clang.
Add a ninja based build system.