Fix build errors in GCC