Upgrade to 1.4.0 upstream version

Bypass npm SSL problems created by npm SSL cert change from a
self-signed one to a normal one. For more info
http://blog.npmjs.org/post/78165272245/more-help-with-self-signed-cert-in-chain-and-npm
Build against postgres as well.

Change-Id: Ifafd43a3dc606fc80fb4aec8949df7874d61321b