[COOK-1740] Joyent SmartOS

https://tickets.opscode.com/browse/COOK-1740

Re-forked and fixed issues from https://github.com/opscode-cookbooks/postgresql/pull/13