Fix compiler errors for OS X 10.7 SDK.