try to fix Apple build

- avoid setting the version of libraries when on a mac (otherwise clang
complains with «invalid argument '-current_version 12.2.284' only
allowed with '-dynamiclib’ »)
- avoid compiling tests when their dependencies are not found

I also fixed some strange stuff around escapement in src/CMakeLists.txt line 344. 

3 arc tests still fail, but my understanding from the issues is that they were failing before.