Convert ENV_PRELOAD and ENV_OUTPUT to macros from static variables.
Use the POSIX get_cwd() instead of get_current_dir_name().
Use POSIX basename() instead of GNU basename().
Don't try to use gcc flags if the compiler isn't gcc.
Add bear_get_environ() and use it instead of the environ global variable
so that we can use _NSGetEnviron() on OS X where the environ global
variable is not available to shared libraries.
On the Mac use DYLD_INSERT_LIBRARIES instead of LD_PRELOAD
On the Mac also set DYLD_FORCE_FLAT_NAMESPACE.
Use stdlib.h instead of the obsolete malloc.h.
Use the detected shared library suffix from cmake in the run.sh scripts.
Remove unnecessary ENV_FLAT after #endif.
Change basename to use local copy of the cmd.
Fix a typo.
Only wrap execve() on the Mac, all the functions call execve() there.
execvp() and execlp() when used will have duplicates if it has to search
the path unfortunately, because they loop through execve() trying each
possible path.  LD_PRELOAD on Linux doesn't end up wrapping the internal
calls, so that's not a problem for it.
Move the expected.json generation into the exec_anatomy executable
so that it can take advantage of the knowledge of which functions
are available and skip output for unavailable functions.