gcc: fix compile errors for gcc 4.8