fix makefile for better platform support