update makefile to detect OS