Add OS detection to Makefile