This fix changes how frameworks are found within NSBundle (note: this
code is only used if the framework can't be found any other way).
Instead of looking through environment variables and trying to guess
where the framework is, it uses the standard NSPathUtilities functions
to check all the standard Framework directories for the framework. This
might fail if the framework is in a non-standard location, but the only
reasonable non-standard location I can think of is the app bundle, so I
also check that. I'll commit this soon if there are no objections.