added support for building the library with clang
fixed clang build on darwin
Merge branch 'feature/clang-support' into develop