cmake: Add support for boost 1.54 (requires -pthread)

Used boost libraries require linking with thread library.
We use -pthread instead of explicitly linking with -lpthread
to automatically set required both compilation and linking flags.
Also add -pipe flag to basic compilation options.

Change-Id: Ic6e777fda3f87967fb3fa7c9beb75f474f8d3ae8