resolve compile error for gcc > 4.5