Replaced own bool typedef with <stdbool.h> where available

Fixes bugreport:7645
http://hercules.ws/board/tracker/issue-7645-rev-12302-compiler-error-and-warnings-on-gcc-49

Signed-off-by: Haru <haru@dotalux.com>