Synchronise build system with OPM-Core

This change-set brings in the most recent improvements to the OPM build system from opm-core.

I forgot to create this PR while putting up the other synchronisation PRs.

This solves #110