Added a cmake module to find correct library names on different platforms, changed modes