compile fix for macosx