fixing compiling issues on mac