Do you mean "Internet Download Manager" ? if yes, IDM always has a version that supports latest stable release, beta release. So it has to work with Firefox 38.0.1.
Even latest IDM version works with Firefox 39 as I said.
Please check for updates for the new version of IDM. If it find something new, let it to update itself or
download the latest version here and install over the current installation.
After that, go to Program Files folder of IDM and drag&drop the
.xpi file to Firefox.
Restart your Firefox and done! It has to be work with Firefox.