add macosx-version-min and -O2 flags