Cowboys top Miami 24-20 in preseason opener