Fix exported spawn function(don't start thread when included).