Fix errors on OS X.