Update OS X Requirement to 10.9 + fixes

Based on #1533, but adds some fixes for new issues that come up when compiling with -mmacosx-version-min=10.9.