What colonies did Spain hand over to the US after the war