The Iranian president made an address broadcast on state media and says it will not attack its neighbours "unless attacked first".