Add support for spawning protothreads.