Fix libtool to work properly with -weak_framework linking