Turn off shared libs on linux when not INSTALL_ERT is set

We (ResInsight) need to be able to compile ERT with static libraries,
and this fix makes that possible.
If INSTALL_ERT is on, (which is default) ERT is built normally and
installed as shared libs etc.
If INSTALL_ERT is off we need to end up with static libs
In the ResInsight flavor of ERT this code has been there for a long
time, but it became appearent that it probably should be included in the
official ERT as well.