The suspect in a mass shooting in New York belongs to “a hateful minority”, the president said.