You are sure, this is the libpq, which was used for linking with nspostgres.so? When you are on linux, try "ldd /usr/local/aolserver/bin/nspostgres.so" to check the path.
We had a few years ago the problem, that psql worked perfectly, but aolserver was not able to load nspostgres. The problem were default permissions on the system that were used during the make install.... since aolserver switches to the specified user+group before loading the .so files, things went wrong withing aolserver. Sounds suspiciously like what you are seeing.
-gustaf