Minor changes to support OSX.