preprocessor and matlab mex fixes for clang compilation