Fixes for OSX Mavericks.