[build] Fix heapshot profiling from the makefiles