erlang: Use $(ERLANG_LIB_DIR) to get Erlang libdir.

Instead of previous custom hack which didn't work properly on Debian.

Thanks: Hilko Bengen.