Fix std=c++0x issue where 'using std::isnan;' collides with the new global-namespace version in c++11.
Add <iostream> in main.cpp.