Compile fixes under OSX