Fix GCC build errors