Fixes in cmake script when building on Linux