Changes to enable compilation on MAC OS X Mavericks