Fix build with postgresql