Include common.h before any system headers.

This should fix some problems building on AIX.
Merge pull request #1262 from waja/fix_aix

Include common.h before any system headers.