minor tweaks to compile on Ubuntu12.04 with gcc-4.6.3 into PostgreSQL 9.3

I am a bit unsure whether this pull request will supersede the earlier one from Björn,
because his  commits also show up here. The fixes for pg-9.3 are clean,
the int4 is a quick hack where a more elegant solution (fix the source...) might 
be appropriate. Yours, Steffen