The US president said the response will depend on whether he thinks "it’s a hostile act"