Fix Makefile to be compatible with erlang.mk