Merge in changes from lib/pq as of 12/27/2013