fix OSX build. still requires care, though