From Stephan Huber, OSX build fix