Fix build when escape functions are not supported in libpq

If the PG version < 9.0.0 then the native escape functions will not be exported, and will fallback to the JS versions.