fix compile on OS X mavericks