Use C99 or C++ bool type when available.

Supports `<stdbool.h>` too.