Fix test compile error for gcc >= 4.7