Small changes to compile in OS X