Move optional platform override to constructor. Replace platform stubbing with constructor injection, platform is read-only starting node v0.11.x .