Allow compilation on 10.9.

Selective backports from 0.27