updated makefile to work for other platforms.

Added osx specific code to use device en1 if the default device is unavailable.