Synchronise build system with opm-core to restore debugging on MacOS X

This change-set brings in recent improvements from the opm-core build system and, in particular, restores the ability to use a source-level debugger based on host tools on MacOS X.