Fix dynamic library conditional compilation for Linux | Mac