Add workaround for gcc 4.7
Add workaround for ICE on gcc 4.7 in the tests