For Apple targets, switched to the recommended posix dlfcn API over the deprecated mach-o API.