This should be used in place of dlsym or GetProcAddress (linux and windows respectively)
Change-Id: I5501b538e03892e8e5a2282678d848fcaf21d911
[ROCm/clr commit: 0479cdb3dd]
making sure the current thread is not null before calling ihipDestroyDevice
Change-Id: Ib75e3f9ee1c4e0065986e3fed1065907220f4379
[ROCm/clr commit: c221406681]