ugly Makefile fix for better crossbuild support