A drug given to women terminally ill with breast cancer can improve survival rates if given early in the disease, research suggests.