clang fixes for cross compiling