[utils] try to use __typeof__ before decltype is implemented in gcc.