OS X: Improve installer

This should mostly fix #2105 and #2044