fixes added for clang compile on mac