tweaks for OSX compilation