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

This change-set brings in the most recent changes and build system improvements from opm-core.  Most importantly, this restore debugging abilities on MacOS X.