fix Dispatch for C++98
better mac detection macros