Properly find libraries in cmake build