Fix the build on OS X 10.7

This has been submitted upstream but isn't merged yet.