adjustments to compile on Apple OSX