Merge pull request #5504 from ntherning/wait-for-native-thread-to-die-in-Thread-Join