Fixed dynamic linking problem with unit tests