Added auto detection routines to determine the operating system.

This should make the toolchain easier to use on different platforms.
Added -lrt to the Makefiles for both tools

Unfortunately, this prevents windows support from manifesting at this time
until I can figure out how to fix this.
Merge branch 'auto-detect'