Fixes for OS X.