Use stdbool.h instead of defining a BOOL constant