Fixing messages and defines related to build type
Fixing static library build. It should work for both WIN&Linux&OS X

But was only tested on Linux. In case there are problems, please open an
issue, or try to fix it directly in MergeStaticLibraries.cmake or if
hard-coding of paths is needed, in PosixMergeStaticLibraries.cmake.in.