Add dllimport support; thread-local storage can no longer return failure; add noreturn