cmake clang support

Tested gcc 4.8 and clang 3.4 on Ubuntu 14.04