Moved << overload to main

This was causing compile issues and runtime stack overflows in g++,
MSVS2013 and minigw....