Fix prepared statement on thrift post-6659