use a typedef instead of its expansion, patch by Michael Spencer