fixed incompatibility with PostgreSQL >= 9.3 (missing includes)