Small modifs to compile in OS X