Fixes for Mac OSX 10.9 compatability.