Ensure that the VM dies when the main thread does.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>