Add CMake build system

Add simple CMake build system tested on FreeBSD 10 and Debian Linux.
At least for FreeBSD stock build system is completely broken, so alternative is totally required, however it may be also useful for other systems, as CMake provides clean and portable builds.