I solved the problem.

This file is in package postgresql-dev of debian. I installed it, delete the precompiled version of ser that i had (and didn't work), and recompile all another time. It successfully creates the postgres.so

Sorry for time lost.

Regards.
Gorka.