Fixed GCC build errors