Fix compilation on OS X where the linker option --no-undefined does not exist.