fix build for lion and mountain lion