Ramirez homers twice to lead Marlins past Rangers