Fixed x-plat script and also ProvidedTypes issue with casting generics in mono.