Fixes for MacOS X.