Include types.h after stdint.h to accomodate for older distributions. 

This fixes compilation on CentOS 5.

This is similar to the fix in b2515b9e0b1e5e709716308a515026b3e6ff23b5