Update Makefile to build correctly on Linux.
Finish device discovery on Linux.
Fix an issue where tests for Windows helper functions would try to run on Linux.