Adds needed libs, tweaks OS X stuff