build fixes on GCC