Fix compilation issues for Mavericks