Encode integer for libpq binary format in test