Make sure threads allocating are in the kRunnable state

Change-Id: I55a08fcd38b3388698ef571d2d4fa9553210e197
diff --git a/src/java_lang_Runtime.cc b/src/java_lang_Runtime.cc
index a2bd399..981db70 100644
--- a/src/java_lang_Runtime.cc
+++ b/src/java_lang_Runtime.cc
@@ -30,6 +30,7 @@
 namespace {
 
 void Runtime_gc(JNIEnv*, jclass) {
+  ScopedThreadStateChange tsc(Thread::Current(), Thread::kRunnable);
   Heap::CollectGarbage();
 }