build system: handle the threads library in the ERT module exactly as opm-core