Make heapdump an optional dependency