Added workaround for apparently broken std::fmod(long double,long double) on Darwin. Added more tracing macros to try and track down remaining Darwin issues.