Fix errors and warnings when building on OS/X 10.9.