Former Tottenham and Portsmouth midfielder Niko Kranjcar has joined New York Cosmos in the North American Soccer League (NASL).