Use events.emit instead of re-importing plugman each time. Part 2.

See details in 961ccd7cd22d43f4b75145d916afec395dd0db56
The first part added the change only under src/platforms/
this one changes it everywhere else.