Fix eunit regression introduced in 2716d83a18

Use alternative way to detect net_kernel:stop/0 has succeeded as
suggested by Ulf Wiger.