Fixed building on some systems.

Now ${Boost_LIBRARIES} variable is used instead of particular Boost library names. For example, these libraries have some different names on Ubuntu Trusty and Fedora.
Also you may want to cherry-pick this commit to the master.