It was “nasty” for Scotland’s First Minister to endorse Donald Trump’s rival in the US presidential election, the president-elect’s son has said.