Added cmake checks for gcc 4.7 vs. 4.6

if gcc <= 4.6 is found, use -std=c++0x, otherwise use -std=c++11

Thanks to Oliver Lee for this patch.