Update detector/test to mock process.platform

Make test passes with this change on my machine.