Add support for OS X 10.9

I'll need some help testing this one to make sure things aren't broken. Fix #1823