Made changes to compile in osx