Fix Mac OS X bundle creation to properly handle dylibs