Fixed compilation erros under GCC toolchain