More linkage fixing. Fixes issue 3596.
Possible fix for the rdtsc call in JitIL.cpp on macosx (issue 3531). This also fixes issue 3595 (although that issue was invalid — we don’t suport scons on linux anymore).
Fix some linkage issues with the cmake build. This should fix issue 3596.