build: use CFLAGS rather than CC to pass flags to compiler

This fixes a failure to build with clang 3.4.
Unsure why but scan-build ignores when passed using CC.

Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>