fix mac compilation. #2