Fixing main.cpp for gcc > 4.7