cmake HAVE_DYLD examples

JulNadeauCA/libagar CMakeChecks.cmake :1138

check_c_source_compiles("
#ifdef __APPLE__
# include <Availability.h>
# ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
#  if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
#   error \"deprecated in Leopard and later\"
#  endif
# endif
#endif

#ifdef HAVE_MACH_O_DYLD_H
#include <mach-o/dyld.h>
#endif

int
main(int argc, char *argv[])
{
	NSObjectFileImage img;
	NSObjectFileImageReturnCode rv;

	rv = NSCreateObjectFileImageFromFile(\"foo\", &img);
	return (rv == NSObjectFileImageSuccess);
}
" HAVE_DYLD)