[build] Fix building on gcc 3