Fix some OSX build issue