Fixed compilation with OSX 10.8 (std::isnan, Issue #23)