clang building
fixed building issues with clang