fix to support compile for gcc 4.6