Try
ldd postgres.so. This will tell you the full pathnames of files that are needed to load postgres.so. Eg. on my system:
[kjk@funky bin]$ ldd postgres.so
libpq.so.2.1 => /usr/lib/libpq.so.2.1 (0x4000d000)
libc.so.6 => /lib/libc.so.6 (0x40020000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40113000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
If you get the same result you would have to copy libpq.so to /usr/lib
(or create a symbolic link, or re-link postgres.so so that it gets a better information on where libpq.so.2.1 lives - although I don't know how to do it)