OS X tweaks for static linking