Fix TARGET_OBJECTS w/static libraries on Xcode 6.

This patch is a WIP and relates to the issue I [filed](http://public.kitware.com/Bug/view.php?id=15038).  Some tests are broken but I don't have the time to find out how to fix them.  Someone could pick up this patch and run with it though.