work around Array#to_hash from extlib