Makefile: Improve portability and use make vars