How to filter orders by product name in magento 1?

$product_name = "YOUR PRODUCT NAME HERE";
 $orders = Mage::getModel('sales/order')
                ->getCollection()
                ->join(array('order_item' => 'sales/order_item'),'main_table.entity_id = order_item.order_id');

 $orders->addFieldToFilter('order_item.name', array(array('like' => '%'.$product_name.'%')));