Update patch generation scripts for gcc 4.6 and 4.7