fixed issue with compiling shared library under gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2.
The problem was with the order of libraries, recently linker requires
that the library will be at the end with the order as they depend on.