Added OS detection to main Makefile