clang compiler fixes

test built on freebsd 10 beta 3