Attempt to fix Travis CI failure by stubbing Thread.new.