Fixes to get things compiling on OSX again.